package com.zhoutao.blog.seven.model.converter;

import com.zhoutao.blog.seven.dao.model.MenuDao;
import com.zhoutao.blog.seven.model.response.Menu;
import org.springframework.stereotype.Component;

@Component
public class MenuConverter extends AbstractConverter<MenuDao, Menu> {
    @Override
    public Menu converterFrom(MenuDao menuDao) {
        return new Menu()
                .setIcon(menuDao.getIcon())
                .setText(menuDao.getText())
                .setId(menuDao.getId())
                .setUrl(menuDao.getUrl())
                .setOrdinal(menuDao.getOrdinal());
    }

    @Override
    public MenuDao converterTO(Menu menu) {
        return null;
    }
}
